package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Customer;
import cn.wolfcode.crm.query.CustomerQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Customer entity);

    Customer selectByPrimaryKey(Long id);

    List<Customer> selectAll();

    int updateByPrimaryKey(Customer entity);

    List<Customer> selectSomeInfo();

    void updateByName(@Param("customerId") Long customerId, @Param("customerName") String customerName);
    int queryForCount(CustomerQueryObject qo);
    List<Customer> queryForList(CustomerQueryObject qo);

    void updateChargeUser(@Param("chargeUserId") Long chargeUserId, @Param("custId") Long custId);

    void updateStatusByCustomerId(@Param("id") Long id, @Param("status") int status);

    void transToPoolByCustomerId(@Param("id") Long id, @Param("statePool") int statePool);

    void absorbCustomer(@Param("custId") Long custId, @Param("chargeUserId") Long chargeUserId, @Param("statePotential") int statePotential);
}